{% extends 'base.html' %}

{% block content %}
<div class="container mt-4">
    <h2><i class="fas fa-file-signature"></i> 领养申请</h2>
    <a href="{% url 'home' %}" class="btn btn-outline-primary mb-3">
        <i class="fas fa-arrow-left"></i> 返回首页
    </a>
    
    <table class="table table-striped table-bordered">
        <thead class="thead-dark">
            <tr>
                <th>申请ID</th>
                <th>猫咪ID</th>
                <th>领养人ID</th>
                <th>申请日期</th>
                <th>经济审核</th>
                <th>环境审核</th>
            </tr>
        </thead>
        <tbody>
            {% for app in applications %}
            <tr>
                <td>{{ app.id }}</td>
                <td>{{ app.catid }}</td>
                <td>{{ app.personid }}</td>
                <td>{{ app.applytime }}</td>
                <td>{{ app.eco_check }}</td>
                <td>{{ app.env_check }}</td>
            </tr>
            {% empty %}
            <tr>
                <td colspan="5" class="text-center">暂无领养申请</td>
            </tr>
            {% endfor %}
        </tbody>
    </table>
</div>
{% endblock %}